import { service } from "./Request";

const verificationsApi = {
    // 获取待审核列表
    getVerifications(params) {
        return service({
            url: "/admin/verifications",
            method: "get",
            params
        }).then(res => {
            if (res.success) {
                return res;
            }
            throw new Error(res.message || '获取实名认证列表失败');
        });
    },

    // 审核认证信息
    verifyUser(id, data) {
        return service({
            url: `/admin/verifications/${id}`,
            method: "put",
            data
        }).then(res => {
            if (res.success) {
                return res;
            }
            throw new Error(res.message || '审核失败');
        });
    }
};

export default verificationsApi; 